/*
 * @Author: your name
 * @Date: 2021-12-11 12:02:33
 * @LastEditTime: 2021-12-12 18:41:32
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \Vue\12.11vue\src\js\list.js
 */
import axios from 'axios'
axios.get('/list').then(res=>{
    console.log(res.data);
    render(res.data)
})
function render(data){
    box.innerHTML=data.map(item=>{
        return `
        <li>
            <dl>
                <dt><img src="${item.img}}"></dt>
                <dd>${item.name}</dd>
            </dl>
        </li>`
    }).join("");
}
